3.1.95 \(\int \frac {(a+b \log (c x^n))^2}{d+e x} \, dx\) [95]

Optimal. Leaf size=72 \[ \frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+\frac {e x}{d}\right )}{e}+\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \text {Li}_2\left (-\frac {e x}{d}\right )}{e}-\frac {2 b^2 n^2 \text {Li}_3\left (-\frac {e x}{d}\right )}{e} \]

[Out]

(a+b*ln(c*x^n))^2*ln(1+e*x/d)/e+2*b*n*(a+b*ln(c*x^n))*polylog(2,-e*x/d)/e-2*b^2*n^2*polylog(3,-e*x/d)/e

________________________________________________________________________________________

Rubi [A]
time = 0.04, antiderivative size = 72, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.150, Rules used = {2354, 2421, 6724} \begin {gather*} \frac {2 b n \text {PolyLog}\left (2,-\frac {e x}{d}\right ) \left (a+b \log \left (c x^n\right )\right )}{e}-\frac {2 b^2 n^2 \text {PolyLog}\left (3,-\frac {e x}{d}\right )}{e}+\frac {\log \left (\frac {e x}{d}+1\right ) \left (a+b \log \left (c x^n\right )\right )^2}{e} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + b*Log[c*x^n])^2/(d + e*x),x]

[Out]

((a + b*Log[c*x^n])^2*Log[1 + (e*x)/d])/e + (2*b*n*(a + b*Log[c*x^n])*PolyLog[2, -((e*x)/d)])/e - (2*b^2*n^2*P
olyLog[3, -((e*x)/d)])/e

Rule 2354

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/((d_) + (e_.)*(x_)), x_Symbol] :> Simp[Log[1 + e*(x/d)]*((a +
b*Log[c*x^n])^p/e), x] - Dist[b*n*(p/e), Int[Log[1 + e*(x/d)]*((a + b*Log[c*x^n])^(p - 1)/x), x], x] /; FreeQ[
{a, b, c, d, e, n}, x] && IGtQ[p, 0]

Rule 2421

Int[(Log[(d_.)*((e_) + (f_.)*(x_)^(m_.))]*((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.))/(x_), x_Symbol] :> Simp
[(-PolyLog[2, (-d)*f*x^m])*((a + b*Log[c*x^n])^p/m), x] + Dist[b*n*(p/m), Int[PolyLog[2, (-d)*f*x^m]*((a + b*L
og[c*x^n])^(p - 1)/x), x], x] /; FreeQ[{a, b, c, d, e, f, m, n}, x] && IGtQ[p, 0] && EqQ[d*e, 1]

Rule 6724

Int[PolyLog[n_, (c_.)*((a_.) + (b_.)*(x_))^(p_.)]/((d_.) + (e_.)*(x_)), x_Symbol] :> Simp[PolyLog[n + 1, c*(a
+ b*x)^p]/(e*p), x] /; FreeQ[{a, b, c, d, e, n, p}, x] && EqQ[b*d, a*e]

Rubi steps

\begin {align*} \int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{d+e x} \, dx &=\frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+\frac {e x}{d}\right )}{e}-\frac {(2 b n) \int \frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (1+\frac {e x}{d}\right )}{x} \, dx}{e}\\ &=\frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+\frac {e x}{d}\right )}{e}+\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \text {Li}_2\left (-\frac {e x}{d}\right )}{e}-\frac {\left (2 b^2 n^2\right ) \int \frac {\text {Li}_2\left (-\frac {e x}{d}\right )}{x} \, dx}{e}\\ &=\frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+\frac {e x}{d}\right )}{e}+\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \text {Li}_2\left (-\frac {e x}{d}\right )}{e}-\frac {2 b^2 n^2 \text {Li}_3\left (-\frac {e x}{d}\right )}{e}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.02, size = 68, normalized size = 0.94 \begin {gather*} \frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (\frac {d+e x}{d}\right )}{e}-\frac {2 b n \left (-\left (\left (a+b \log \left (c x^n\right )\right ) \text {Li}_2\left (-\frac {e x}{d}\right )\right )+b n \text {Li}_3\left (-\frac {e x}{d}\right )\right )}{e} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Log[c*x^n])^2/(d + e*x),x]

[Out]

((a + b*Log[c*x^n])^2*Log[(d + e*x)/d])/e - (2*b*n*(-((a + b*Log[c*x^n])*PolyLog[2, -((e*x)/d)]) + b*n*PolyLog
[3, -((e*x)/d)]))/e

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 4.
time = 0.16, size = 1392, normalized size = 19.33

method result size
risch \(\text {Expression too large to display}\) \(1392\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*ln(c*x^n))^2/(e*x+d),x,method=_RETURNVERBOSE)

[Out]

I/e*n*ln(e*x+d)*ln(-e*x/d)*b^2*Pi*csgn(I*c*x^n)^3+a^2*ln(e*x+d)/e-I/e*n*ln(e*x+d)*ln(-e*x/d)*b^2*Pi*csgn(I*x^n
)*csgn(I*c*x^n)^2+I*ln(e*x+d)/e*ln(c)*Pi*b^2*csgn(I*c)*csgn(I*c*x^n)^2-I/e*n*dilog(-e*x/d)*b^2*Pi*csgn(I*c)*cs
gn(I*c*x^n)^2-I/e*n*dilog(-e*x/d)*b^2*Pi*csgn(I*x^n)*csgn(I*c*x^n)^2-2*b/e*n*ln(e*x+d)*ln(-e*x/d)*a+2*b^2/e*n^
2*ln(x)*ln(-e*x/d)*ln(e*x+d)+2*b*ln(e*x+d)/e*ln(x^n)*a-1/4*ln(e*x+d)/e*Pi^2*b^2*csgn(I*c)^2*csgn(I*c*x^n)^4-2*
b^2/e*n*ln(-e*x/d)*ln(e*x+d)*ln(x^n)-2*b/e*n*dilog(-e*x/d)*a+1/2*ln(e*x+d)/e*Pi^2*b^2*csgn(I*c)*csgn(I*x^n)^2*
csgn(I*c*x^n)^3-I*ln(e*x+d)/e*ln(c)*Pi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gn(I*c*x^n)^2+I*ln(
e*x+d)/e*Pi*a*b*csgn(I*x^n)*csgn(I*c*x^n)^2+I*ln(e*x+d)/e*ln(x^n)*b^2*Pi*csgn(I*c)*csgn(I*c*x^n)^2+I/e*n*dilog
(-e*x/d)*b^2*Pi*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)-I*ln(e*x+d)/e*ln(c)*Pi*b^2*csgn(I*c)*csgn(I*x^n)*csgn(I*c*
x^n)+I/e*n*ln(e*x+d)*ln(-e*x/d)*b^2*Pi*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)-I*ln(e*x+d)/e*Pi*a*b*csgn(I*c)*csgn
(I*x^n)*csgn(I*c*x^n)-I/e*n*ln(e*x+d)*ln(-e*x/d)*b^2*Pi*csgn(I*c)*csgn(I*c*x^n)^2-I*ln(e*x+d)/e*ln(x^n)*b^2*Pi
*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))^2/(e*x+d),x, algorithm="maxima")

[Out]

a^2*e^(-1)*log(x*e + d) + integrate((b^2*log(c)^2 + b^2*log(x^n)^2 + 2*a*b*log(c) + 2*(b^2*log(c) + a*b)*log(x
^n))/(x*e + d), x)

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))^2/(e*x+d),x, algorithm="fricas")

[Out]

integral((b^2*log(c*x^n)^2 + 2*a*b*log(c*x^n) + a^2)/(x*e + d), x)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (a + b \log {\left (c x^{n} \right )}\right )^{2}}{d + e x}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*ln(c*x**n))**2/(e*x+d),x)

[Out]

Integral((a + b*log(c*x**n))**2/(d + e*x), x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))^2/(e*x+d),x, algorithm="giac")

[Out]

integrate((b*log(c*x^n) + a)^2/(x*e + d), x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\left (a+b\,\ln \left (c\,x^n\right )\right )}^2}{d+e\,x} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*log(c*x^n))^2/(d + e*x),x)

[Out]

int((a + b*log(c*x^n))^2/(d + e*x), x)

________________________________________________________________________________________